package com.future.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.future.domain.Announcement;
import com.future.domain.DTO.AnnouncementDTO;
import com.future.domain.Result;

public interface AnnouncementService extends IService<Announcement> {
    Result publishAnnouncement(AnnouncementDTO announcementDTO);

    Result getAnnouncements(IPage<Announcement> page);

    Result getAnnouncementById(Long id);
    Result getAnnouncementsByName(IPage<Announcement> page, String name);

    Result top(Long id);

    Result cancelTop(Long id);
    Result getLatestAnnouncement();
    Result getPinnedAnnouncements();
}
